<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInformationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('information', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('')->comment('资讯标题');
            $table->text('content')->comment('资讯内容');
            $table->string('cover')->default('')->comment('资讯封面');
            $table->string('source')->default('')->comment('资讯来源');
            $table->integer('type')->comment('资讯类型');
            $table->integer('state')->comment('资讯状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('information');
    }
}
